package com.dyy.proxy.cglib;

/**
 * @author dingyy@jccfc.com
 * @since 2021/12/12 22:24
 */
public class AdminServiceCglibProxyTest {

    public static void main(String[] args) {
        AdminCglibService adminCglibService = new AdminCglibService();
        System.out.println("目标代理对象：" + adminCglibService.getClass());
        AdminServiceCglibProxy factory = new AdminServiceCglibProxy(adminCglibService);
        AdminCglibService proxy = (AdminCglibService) factory.getInstance();
        System.out.println("实际代理对象：" + proxy.getClass());
        Object obj = proxy.find();
        System.out.println("find 返回对象：" + obj.getClass());
        System.out.println("----------------------------------");
        proxy.update();
    }
}
